<?php
class Zend_View_Helper_DisplayFlashMessages extends Zend_View_Helper_Abstract
{
    /**
     * Retourne une liste HTML des messages flash
     *
     * @return string
     */
    public function displayFlashMessages()
    {
        $flash = Zend_Controller_Action_HelperBroker::getStaticHelper('FlashMessenger');
        if ($flash->count()) {
            return $this->view->htmlList(
                $flash->getMessages(),
                false,
                array('class' => 'success')
            );
        } else {
            return '';
        }
    }

}